08eba3
@@ -1774,6 +1774,11 @@
private void create_table_core(final RawStore ms, final Table tbl,
                                    List<SQLCheckConstraint> checkConstraints)
         throws AlreadyExistsException, MetaException,
         InvalidObjectException, NoSuchObjectException {
+      // To preserve backward compatibility throw MetaException in case of null database
+      if (tbl.getDbName() == null) {
+        throw new MetaException("Null database name is not allowed");
+      }
+
       if (!MetaStoreUtils.validateName(tbl.getTableName(), conf)) {
         throw new InvalidObjectException(tbl.getTableName()
             + " is not a valid object name");
